home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / Think PM ⁄ AScript Patch 1.0 / TPM70⁄AS11 Patch 1.0 docs < prev   
Text File  |  1994-05-24  |  2KB  |  24 lines

  1. Alessandro Levi Montalcini
  2. C.so Re Umberto 10
  3. 10121 Torino
  4. Italy
  5. e-mail: lmontalcini@pmn.it
  6.  
  7. Think Project Manager 7.0 / AppleScript 1.1 Patch 1.0
  8. FOR PROGRAMMERS ONLY - THIS IS USELESS IF YOU DON'T USE SYMANTEC C OR C++ AND APPLESCRIPT
  9.  
  10.   This is a quick hack I had to make because AppleScript 1.1 didn't seem to work right with Think Project Manager 7.0. I don't know if anybody else ran into this problem. Please send me a mail if you found a better way to work around it, or if your setup works as it should (so I can try to find what's wrong with mine). I had this problem both on a PowerMac 6100 (italian 7.1.2 with HW Sys Update 3.0) and a Duo 230 (italian 7.1 with HSU 3.0).
  11.  
  12.   I am developing a complex utility which requires building more than 30 TPM projects. Since building 30 projects takes a while, I started using AppleScript to automate the whole task. Everything worked fine until I installed AppleScript 1.1. After that, the line
  13.  
  14.         save project document 1 to file "xxx" as a project type
  15.  
  16. stopped working. I got plenty of "Think Project Manager got an error: can't make some data into the expected type" (i.e. errAECoercionFail). Recording a "Build code resource…" and playing it back works only until a change is made to the script; as soon as the script is recompiled, the error comes out again. Is there another syntax to make that work? If so, let me know.
  17.  
  18.   I tracked the Apple Events until I figured out that the 'fltp' parameter was being passed with an 'obj ' descriptor instead of a 'type' in the AEPutKeyDesc call. Don't ask me why (maybe something weird in the 'aete'?). I only know that I lost many hours trying to clean up and reinstall my environment with no results.
  19.  
  20.   The patch intercepts the _Pack8 trap and watches for a 0x0610 selector in D0 (AEPutKeyDesc); it checks if the keyword is 'fltp' and the descriptor is an 'obj '. It everything matches it creates a brand new descriptor of type 'type' that contains 4 bytes of data (the 'PRTP' keyword) and replaces the 'obj ' before jumping to the original AEPutKeyDesc. It does NOT dispose the descriptor (it's just a hack and it works fine for me, so what?).
  21.  
  22.   WARNING: this patch doesn't check the environment and prevents ANYONE from creating an 'fltp' with an 'obj ' descriptor. Don't even think of installing it if you don't really need it.
  23.  
  24.   This patch if free and may be freely distributed as long as this documentation is included. I make no warranties on it, so use it at your own risk.